<%@page import="bdclass.producto"%>
<%@page import="java.sql.ResultSet"%>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">



<html xmlns="http://www.w3.org/1999/xhtml">
    
<%String nomProd;%>
<%int idProd;%>

<head>
		<link rel="stylesheet" media="screen" type="text/css" href="css/csspop.css"/>
		<link rel="stylesheet" media="screen" type="text/css" href="css/layout.css" />
		<link rel="stylesheet" href="css/datepicker.css" type="text/css" />		
		
		<!--codigo pop up-->
		<SCRIPT LANGUAGE="JavaScript">
		<!-- Begin
			function popUp(URL) {
				day = new Date();
					id = day.getTime();
					eval("page" + id + " = window.open(URL, '" + id + "', 		'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=750,height=250,left = 232,top = 160');");
					}
				// End -->
		</script>
		
		<!--funcion limpiar los text-->
		<script>
 function limpia(elemento)
 {
 elemento.value = "";
 }

 function verifica(elemento)
 {
 if(elemento.value == "")
   elemento.value = "";
  }
 </script>



<!-- script insertar solo numeros-->
<script language="javascript">
function mis_datos(){
var key=window.event.keyCode;
if (key < 48 || key > 57){
window.event.keyCode=0;alert("Ingrese solo numeros");
}}
</script>
		
		
		
</head>
<body>
<div id="blank">
	  <p>&nbsp;</p>
	  <p>Pan Tradicional</p>
</div>

<div id="page">

<div id="central" align="center" style="width:auto; margin-left:auto;">
<div>
<form id="form1" method="post" action="toma_pedido.jsp">
  <table width="55%" border="0">
    <tr>
      <td align="center" style="background-color:#CCCCCC;">PRODUCTO</td>
      <td align="center" style="background-color:#CCCCCC;">CANTIDAD</td>
    </tr>
    <tr>
      <td align="center">
          
          <select size="1" name="producto" onchange="confirmar()">
              <option value="-">SELECCIONE UN PRODUCTO</option>
            <%
                    try
                    {
                        producto prod=new producto();
                        ResultSet rs=prod.SelectProd();

                        Class.forName("org.postgresql.Driver");



                        while(rs.next())
                        {
                            nomProd=rs.getString("nombre");
                            idProd=rs.getInt("id_producto");
                            %>
                            <option value="<%=idProd%>"><%=nomProd%></option>
                            <%
                        }
                           
                    }
                    catch (Exception ex) 
                    {
                        System.out.println(ex.toString());
                    }
                    
                    
                    %>
          </select>      </td>
      <td align="center"><label for="txtCantidad"></label>
        <input type="text" name="txtCantidad" id="txtCantidad" onkeypress="mis_datos()" onclick="javascript: limpia(this);" /></td>
    </tr>
	<tr>
      <td align="center">&nbsp;</td>
      <td align="center">&nbsp;</td>
    </tr>
    <tr>
      <td align="center"><input type="submit" name="btnOk" id="btnOk" value="ACEPTAR" /></td>
      <td align="center"><input type="reset" name="btnCancelar" id="btnCancelar" value="Restablecer" /></td>
    </tr>
  </table>
</form>

</div>

</div>

<div id="espacio"></div>


</div>


</body>
</html>